import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

import 'com/lzp/flutternote/animation/animation_show.dart';
import 'com/lzp/flutternote/button/button_show.dart';
import 'com/lzp/flutternote/imageview/image_show.dart';
import 'com/lzp/flutternote/list/list_show.dart';
import 'com/lzp/flutternote/router/router_show.dart';
import 'com/lzp/flutternote/text/text_show.dart';

/// 跨包的跳转写到这里，将来尝试组件化可以直接修改，非跨包的直接跳转即可
/// 比如：从list包跳转到text包
class Router {
  static void toList(BuildContext context) {
    Navigator.push(context,
        new MaterialPageRoute(builder: (context) => new VerticalListWidget()));
  }

  static void toText(BuildContext context) {
    Navigator.push(
        context, new MaterialPageRoute(builder: (context) => new TextShow()));
  }

  static void toButton(BuildContext context) {
    Navigator.push(
        context, new MaterialPageRoute(builder: (context) => new ButtonShow()));
  }
  static void toImage(BuildContext context) {
    Navigator.push(
        context, new MaterialPageRoute(builder: (context) => new ImageShow()));
  }

  static void toAnimation(BuildContext context){
    Navigator.push(
        context, new MaterialPageRoute(builder: (context) => new AnimationShow()));
  }

  static void toRouterShow(BuildContext context){
    Navigator.push(
        context, new MaterialPageRoute(builder: (context) => new RouterShow()));
  }
}
